﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GEAR_Structure;

namespace Gear_Base
{
    public partial class MaterialNewCategoryForm : Form
    {
        private Category_material category;

        public MaterialNewCategoryForm()
        {
            InitializeComponent();
            category = new Category_material();
            txtCategoryDescr.DataBindings.Add(new Binding("Text", category, "Description"));
        }

        public MaterialNewCategoryForm(Category_material _category)
        {
            InitializeComponent();
            category = _category;
            txtCategoryDescr.DataBindings.Add(new Binding("Text", category, "Description"));
        }

        public Category_material getValue(Form parent)
        {
            base.ShowDialog(parent);
            return category;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            category = null;
            this.Close();
        }
        
    }
}
